<template>
    <a-modal class="my-modal short" v-model="modal_show" title="结果确认" @ok="modelok" @cancel="modelcancel" width="800px" :maskClosable="false" :centered="true">
        <div class="body-content">
            <span>
                当前勾画图斑在空间上涉及：{{fcolds.length}}个。
            </span>
            <span v-show="fcolds.length==0">
                是否作为新增图斑进行添加？
            </span>
             <span v-show="fcolds.length==1">
                是否替换旧图斑？
            </span>
             <span v-show="fcolds.length>1">
                是否替换旧图斑的？
            </span>
        </div>
    </a-modal>
</template>
<script>
export default {
    components: {},
    data() {
        return {
            modal_show: false,
            fc:[],
            fcolds:[],
        };
    },
    mounted() {
        this.$mitt.$off('draw_end_check').$on('draw_end_check', _options => {
            const this_options = {
                fc: [],
                fcolds: [],
            };
            Object.assign(this_options, _options);
            this.fc = this_options.fc;
            this.fcolds = this_options.fcolds;
            this.modal_show = true;
        });
    },
    methods: {
        modelcancel(){
            this.$mitt.emit("draw_end_check_back",{
                fc:this.fc,
                fcolds:this.fcolds,
                status:false,
            })
        },
        modelok() {
            this.$mitt.emit("draw_end_check_back",{
                fc:this.fc,
                fcolds:this.fcolds,
                status:true,
            })
            this.modal_show = false;
        },
    },
};
</script>
<style></style>
